package org.lql.algo.codecrush.week007;

/**
 * @author: liangqinglong
 * @date: 2025-08-18 07:50
 * @description: 374. 猜数字大小 <a href="https://leetcode.cn/problems/guess-number-higher-or-lower/description/">...</a>
 **/
public class GuessGame {

	public int guessNumber(int n) {
		int left = 1;
		int right = n;
		while (left < right) {
			int mid = left + (right - left) / 2;
			int res = guess(mid);
			if (res <= 0) {
				right = mid;
			} else {
				left = mid + 1;
			}
		}
		return left;
	}

	private int guess(int mid) {
		return 0;
	}

	public static void main(String[] args) {
		GuessGame guessGame = new GuessGame();
		int res = guessGame.guessNumber(10);
		System.out.println(res);
	}
}
